package converter;

import org.springframework.core.convert.converter.Converter;
import org.springframework.stereotype.Component;

import domain.Image;

@Component
public class StringToImageConverter implements Converter<String, Image> {

       @Override
       public Image convert(String strImage) {
               byte[] byteImage = strImage.getBytes();
               Image image = new Image(byteImage);
               return image;
       }
}